package com.wuren.faceSwiping.aboutUs.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wuren.faceSwiping.aboutUs.entity.CooperationMessage;
import com.wuren.faceSwiping.aboutUs.mapper.CooperationMessageMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CooperationMessageService extends ServiceImpl<CooperationMessageMapper, CooperationMessage> {
    @Autowired
    private CooperationMessageMapper cooperationMessageMapper;

    /**
     * 查所有信息
     * @return
     */
    public List findAll() {
        QueryWrapper q = new QueryWrapper();
        return cooperationMessageMapper.selectList(q);
    }
    /**
     * 新增留言
     * @param cooperationMessage  留言属性
     * @return
     */
    public int add(CooperationMessage cooperationMessage){
        return  cooperationMessageMapper.insert(cooperationMessage);
    }

}
